home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
United Public Domain Gold 4
/
United Public Domain Gold 4.iso
/
fredfish
/
ff.0476.dms
/
ff.0476.adf
/
Browser
/
browser.doc
< prev
next >
Wrap
Text File
|
1991-04-17
|
13KB
|
350 lines
Browser -- a programmer's "Workbench". Release 1.7
) 1990 Peter da Silva
Introduction
In earlier versions of Browser, I opened this document with the
somewhat confident comment:
The Amiga "Workbench" has some serious deficiencies as
a working environment. The most important one is that
it doesn't let you operate on just any file (this is
rumored to be fixed in 1.4, by the way), but there are
others. It's designed to be easy to learn and use, but
it just isn't very powerful.
Well, 1.4 is now 2.0, and it's almost here. So this is probably going to
be the last revision of Browser. I'm now using Workbench 2.0 on a daily
basis, and I find I'm not using Browser that much. It remains faster than
workbench and cleaner for quick jobs, but not enough for me to spend much
time on it. However, lots of people remain in a 1.3 environment, and with
the new release of the Aztec C compiler (5.0d) I've been able to clear up
several outstanding bugs in Browser. Thus, the new release.
This program is an attempt to deal with limitations in earlier
versions of the Workbench. It runs under all versions of AmigaOS, including
2.0, but is expected to be most useful for people running 1.3 and earlier.
It is not a complete replacement for Workbench, nor is it intended to be.
There is no attempt to support icons, and there are no disk-oriented
functions (formatting, copying, etc...).
What Browser does allow you to do, easily and conveniently, is to
move, copy, rename, and delete files and directories. It will also let you
execute either Workbench or CLI programs, either directly by double-
clicking them or by selecting them from a menu. By combining these you can
set up a complete operating environment that will, to a large extent,
replace both Workbench and the CLI.
Browser presents you with a set of windows, representing directories,
with all the files and directories within each listed in alphabetical
order. Directories, displayed in color 2 (red/orange), are listed first,
followed by the files. Selected files are displayed in inverse video.
Selecting Files
You can select individual files three ways. First, just click on
a file name. This will select that file and deselect all others. If you
hold down the shift key when you click on the file, it will be selected
without deselecting other files. This way you can build a list of files
to operate on. So far this is just like Workbench, but if you click a
selected file while holding down the shift key, it will be deselected
without affecting other selected files. This lets you take back mistakes.
Finally, you can use the menu items "Sel All" and "Sel Match" to
select a group of files at once. "Sel All" will select all files in the
active window. "Sel Match" will allow you to enter a pattern and then
select only files matching that pattern in the active window. These
normally act as toggles... if you have any selected files in the active
window they will be deselected if they match.
Actions
There are, again, three ways to manipulate selected files. First,
you can drag a file or selected files to another window by holding down the
left mouse button while you move the mouse. When you release the button,
Browser will attempt to move the files to the location you indicate. This
is just like the Workbench.
Secondly, double-clicking a file will open it. If it's a directory,
it will be opened and files in it will be displayed. If it's a program
with an accompanying '.info' file, it will be launched as a Workbench task.
This will also work with Projects, if the accompanying .info file specifies
a tool. Finally, Browser will ask you if you want to launch it as a CLI
program.
Any other files selected will be passed to the new program, either
on the CLI command line or in the Workbench Args structure. This is the
normal Workbench shift-double-click method.
Third, you can select a menu item.
Menus
There are two main Browser menus. The first, "Browser", relates to
the browser environment itself. The second, "Actions", relates to the files
and directories displayed in Browser's windows. Menu items act either on
selected files or on the currently active window. There are additional
menus (called Tools Menus) that can be set up by the user.
Browser Menu
Open
This entry is equivalent to double-clicking the selected
file. It is included for consistency with Workbench. Strictly
speaking it should be in the Actions menu, but it seems to fit
here better.
Close
This entry is equivalent to clicking the active window's
close gadget. Again, it's included for consistency with the
Workbench.
Rescan
This entry requests Browser to re-scan the directory displayed
in the active window. This is equivalent to, but a lot more convenient
than, closing and re-opening the window. I suppose I could poll the
disk for these, but if you use floppies much this becomes slightly
inconvenient.
Show >
This entry selects whether files, files and sizes, or full
file information is displayed for the current window. It has been
extended since 1.6a and is now provides a full set of options.
Sel All
This selects all files in the active window. Actually, it
toggles the selection of each file. Currently selected files will
be deselected.
Sel Match...
This is the same as Sel All, except that a pattern may be
provided to further restrict the selection.
Options
This allows you to modify the global behaviour of Browser
to some extent:
X Toggle Selections
This affects whether a selection through the menu,
or a shift-click, will deselect an already selected file.
X Move files into subdirectories
This effects whether you can move files into a
subdirectory by dragging them to it and releasing the mouse
button when the mouse is over the directory's name. If this
is not set you have to open the directory first.
X Ask before moving into subdirectories
If you permit files to be moved into subdirectories,
this determines if Browser will prompt you beforehand.
Quit
This selection closes all windows and terminates Browser.
Actions Menu
The entries in this menu act on files rather than changing the state
of Browser.
WB Tool
The currently selected file (singular) is entered into the
Tools menu as a workbench tool.
CLI Tool...
The currently selected file (singular) is entered into the
Tools menu as a CLI tool. Browser will pop up a requestor and allow
you to add additional arguments.
Rename...
The currently selected file (singular) is renamed. Browser
will pop up a requestor and allow you to enter the new name.
Duplicate...
The currently selected file (singular) is duplicated. Browser
will pop up a requestor and allow you to edit the new name (generated
by BumpRevision: "file" becomes "copy of file", and so on).
Make Dir...
Creates a new directory in the currently active window.
Browser will pop up a requestor and allow you to specify the name of
the new directory.
Delete
Deletes all selected files. This will only delete directories
if they happen to be empty.
Delete All
Deletes all selected files AND directories, recursively.
Tools Menus
These menus (starting with Tools) are initially empty. They are filled
in by selecting "Add * Tool" or from the file "s:browser.inittab". When you
select an entry in these menus they're run (either as workbench or CLI
programs) with all selected files being passed to the program. If you have
a choice, you should make a program run under the Workbench... it's MUCH
more reliable.
Environment
Browser can itself be run from either the Workbench or the CLI. The
separate "bgbrowser" program no longer exists... use "runback" or some
equivalent program if you want to run browser in a detached mode.
Browser uses a file, "s:browser.inittab", to pre-load the command
menus. Each line in the file is a separate menu item, made up of 5 fields
separated by semicolons:
name;environment;command;stack;window
The first field is the name that is to appear in the menu. This
name can be preceded by the name of the menu to insert it in followed by
a period. If the menu name is left off, the "Tools" menu will be used.
For example, "Applications.Terminal Emulator" will create a menu entry
for "Terminal Emulator" and install it in the "Applications" menu. If the
menu doesn't already exist, it will be created.
The two environments currently supported are the CLI and the
Workbench. Project files (such as AmigaBasic programs) aren't supported
through the menu system at this time, though they may be at a later date.
They do work just fine when you double-click them.
If our terminal emulator was to be run as a Workbench program, then
this field should contain "Workbench". If it can't run under the Workbench,
then it should contain "CLI". It is better, if possible, to run programs
under the Workbench. It's a cleaner environment, and you don't get extra
windows cluttering up your display.
The next field is the name of the command. This should contain the
full path name to the program. If the command is a CLI command, additional
arguments can be included at this point. The names of any files highlighted
when this menu is selected will be added to the end. If the command is
a Workbench command, this should just be the program name. Highlighted
files will be passed to the program in the Workbench Args structure.
The next field is the stack size. It may be left off, and will
default to 8K.
The last field is the window. For a CLI command, this is the
window that will be opened to run the CLI in. For a Workbench command,
this is the ToolWindow that will be passed to it. If it's left off a
default will be used.
Applications.Terminal Emulator;Workbench;sys:system/Termulator
Limitations:
The CLI capability occasionally leaves you in an interactive CLI
after you exit the program. This is caused by using one of the BREAK keys
while you're in the program. I had to leave this in to get finicky CLI
programs, such as Manx 'Z' editor, to work properly.
If you're copying a file to disk and you get a disk error,
occasionally browser will appear to ignore disk errors and keep on trying
to write. Actually, Browser handles all disk errors that get reported to
it. For some reason AmigaDOS doesn't report errors promptly. I suspect
this is related to requesting writes larger than a disk buffer, but I
don't plan on having Browser do anything about this in the near future.
Browser seems to run just fine with only the standard 4K stack. The
minimum environment you need to run browser is:
libs (dir)
icon.library
If you also want to run CLI programs, you also need:
c (dir)
cd EndCLI
Failat NewCLI
Run Stack
l (dir)
Ram-Handler
These are needed to run the little scripts Browser builds in RAM: when you
run a CLI program.
Author:
Peter da Silva
U.S.Mail:
15770 Bellaire Blvd. #107
Houston, TX 77083
Phone:
+1 713 568 0480 (data: Taronga Park)
+1 713 274 5180 (work)
Internet:
peter@taronga.hackercorp.com
Compuserve:
>internet:peter@taronga.hackercorp.com (preferred)
70216,1076
I'm currently getting a new domain name, so if your mail to
taronga.hackercorp.com bounces or is delayed, try taronga.com. If all
else fails I'm currently working at Ferranti International Controls
Corporation, so try peter@ferranti.com.
Donations:
If you find this program useful, you may send a donation to the
author, Peter da Silva. For a donation of thirty dollars or more you will
receive the latest version of Browser (or, if you prefer, the next version
if it ever comes out... as I said, 1.7 is likely to be the ultimate release).
If you have been waiting for the next release and it hasn't got
to you, call me or send me email. With this release I'm sending all the
folks who contributed the program and a copy of the source. You should get
a copy in the mail soon.
Sponsors:
The following people have donated money, and are willing to have
their names up in lights. Thanks, folks. In no particular order...
<CB>
Kent and Judy Polk
Burkard S. Kr|ger
D. Ballinger
Ron Harper
Steven D. Kapplin
David Allen
Glen Fullmer
Ed Vishoot
Jeff Van Epps
P. Wright
Heinz Mathalm
Blaine Gardner
Liam Healy
Johan Widin
D. Ratliff
T. J. Pagano
J|rgen Klawitter
Ulrich Denker
Rick Jones
Guenther Engelhardt
And special thanks to my wife, Stephanie, who talked me into doing this
release.